<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTechnologiesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('technologies', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//关联tyw_users中的id
			$table->integer('uid');
			//技术名称
			$table->string('tech_name');
			//text 技术开发者
			$table->text('developer');
			//text 技术原理和概况
			$table->text('theory');
			//text 技术优势
			$table->text('advantage');
			//技术优势简介
			$table->text("advantage_des");
			//float 技术评价 1-5 如1.5
			$table->float('score');
			// 技术图片
			$table->string('image');
			//技术简介
			$table->text('description');
			//技术原理简介
			$table->text("theory_des");
			//典型客户
			$table->text("typical_client");
			//是否融资
			$table->tinyInteger("is_financing");
			//是否推荐到低碳生活首页
			$table->tinyInteger('is_rec_industry_index');
			//是否推荐到低碳生活首页
			$table->tinyInteger('is_rec_list_bottom');
			//推荐到右侧列表
			$table->tinyInteger("is_rec");
			//添加 融资后的页面链接
			$table->text("finance_url");
			// 节能率
			$table->double("efficiency", 13, 2);
			$table->timestamp('create_time');

			// 排序
			$table->tinyInteger('order');
			// 产业首页排序
			$table->tinyInteger('industry_order');
			// 项目审核状态
			$table->tinyInteger("verify_state");
			//热门排序
			$table->tinyInteger("hot_state");
			
			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('technologies');
	}

}
